package test2;

public class Phone {
    //定义存储手机信息变量
    private String brand;
    private String model;
    private String color;
    private int price;

    //构造方法
    public Phone() {}
    public Phone(String brand,String model, String color,int price) {
        this.brand = brand;
        this.model = model;
        this.color = color;
        this.price = price;
    }

    //设定与获取方法
    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

}
